﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using ATSBLL;
using ATSModel;

public partial class AddUser_AddUser : System.Web.UI.Page
{
    private TRoleInfo RoleInfo;
    private Role role;

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Commit_Click(object sender, EventArgs e)
    {
        role = new Role();

            //UserID,, UserName;
       string UserID = UserID_txt.Text.Trim();
        //UserName = UserName_txt.Text.Trim();

        RoleInfo = new TRoleInfo(UserID);//, UserName
        role.Insert(RoleInfo);

    }
    protected void SearchByName_Click(object sender, EventArgs e)
    {

    }

    protected void BindData()
    {
        //this.GridView1.DataSource = thouse.GetTHousesbyMO(MOID);
        //this.GridView1.DataBind();
    }

    protected void GridView1_PageIndexChanging(object sender, System.Web.UI.WebControls.GridViewPageEventArgs e)
    {
        //this.GridView1.PageIndex = e.NewPageIndex;
        //BindData();
    }

    protected void GridView1_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
    {
        //if (e.Row.RowType == DataControlRowType.DataRow)
        //{
        //    if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate)
        //    {
        //        ((LinkButton)e.Row.Cells[2].Controls[0]).Attributes.Add("onclick", "javascript:return confirm('你确认要删除!')");
        //    }
        //}
    }

    protected void GridView1_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
    {
        //string productSN = GridView1.DataKeys[e.RowIndex].Values[1].ToString();
        //thouse.Delete(productSN);
        //BindData();
    }
}
